Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-developer is "get-typical-time-trends">

It allows to retrieve the typical time trends inserted.

Inputs

The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON. If the values are not present in the input JSON, these are read by those in the configuration. If they are not present in either part, an error is generated for the necessary parameters.

Outputs

A JSON file indicating the list of a typical time trend

serviceUri (required) string
This is the uri of the sensor used as source of raw data. You can find type of sensor in the "Data Inspector" of Snap4city.
valueName (optional) string
This is the name of the sensor that is also the name of the calculated value.
atDate (optional) string
The format must be this: "yyyy-mm-dd". This is the data chosen to select the period used to collect raw data from sensors.
from (optional) string
The format must be this: "yyyy-mm-dd". With reference date and number of periods we define the time interval of computations. This is the start date of the interval.
to (optional) string
The format must be this: "yyyy-mm-dd". With reference date and number of periods we define the time interval of computations. This is the end date of the interval.
trendType (optional) string
This is the trend type that you want to save. There are 3 typical trend: monthDay, monthWeek and dayHour.
computationType (optional) string
This is the computation type that you want to use. There are 4 computation type: average, median, min or max.